/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Guis.Categoria;

/**
 *
 * @author angelo
 */
public class NewClass {
    /*
    
    
     Dimension desktopSize = jDesktopPane1.getSize();
     Dimension jInternalFrameSize = this.getSize();
     this.setLocation((desktopSize.width - jInternalFrameSize.width) / 2,
     (desktopSize.height - jInternalFrameSize.height) / 2);


    
     private void BloquearCopiar(JTextField a) {
     // BLOQUEA LA ACCION COPIAR 
     InputMap map2 = a.getInputMap(JTextField.WHEN_FOCUSED);
     map2.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), "null");
     }

     private void MaximoCaracteres20(JTextField a) {
     a.addKeyListener(new KeyAdapter() {
     @Override
     public void keyTyped(KeyEvent e) {
     JTextField a = (JTextField) e.getSource();
     if (a.getText().length() == 20) {
     getToolkit().beep();
     e.consume();
     }
     }
     });
     }
    
     private void SoloLetras(JTextField a) {
     a.addKeyListener(new KeyAdapter() {
     @Override
     public void keyTyped(KeyEvent e) {
     char c = e.getKeyChar();
     if (Character.isDigit(c)) {
     getToolkit().beep();
     e.consume();
     }
     }
     });
     }

     private void SoloNumeros(JTextField a) {
     a.addKeyListener(new KeyAdapter() {
     @Override
     public void keyTyped(KeyEvent e) {
     char c = e.getKeyChar();
     if (!Character.isDigit(c)) {
     getToolkit().beep();
     e.consume();
     }
     }
     });
     }
    
    
     //EL EVENTO
    
     this.btnAceptar.addKeyListener(new java.awt.event.KeyAdapter() {
     @Override
     public void keyPressed(java.awt.event.KeyEvent e) {
     metodoCargar();
     }
     });

    
     */
}
